[E2010] [EWSMA] I do not see all Room appointments

Hi all,

i have a problem when i try to see the appointments of a room.
I created a service with the EWS Managed API using my own credentials (user@mydomain.com). Then i created a method to return a list of  custom objects named RoomMeeting by passing my service and the smtp address of the room mailbox (myroom@mydomain.com).

Here is the method :

       public static ObservableCollection<RoomMeeting> FindAppointmentsForTodayTomorrow(ExchangeService service, string roomAddress)
        {
            ObservableCollection<RoomMeeting> meetings = new ObservableCollection<RoomMeeting>();
            CalendarView calendarView = new CalendarView(DateTime.Now, DateTime.Today + TimeSpan.FromDays(1));
            calendarView.PropertySet = new PropertySet();
            calendarView.PropertySet.Add(AppointmentSchema.Start);
            calendarView.PropertySet.Add(AppointmentSchema.End);
            calendarView.PropertySet.Add(AppointmentSchema.Organizer);
            calendarView.PropertySet.Add(AppointmentSchema.Subject);
            calendarView.PropertySet.Add(AppointmentSchema.Duration);
            calendarView.PropertySet.Add(AppointmentSchema.Location);
            calendarView.MaxItemsReturned = 10;
            Mailbox mailbox = new Mailbox(roomAddress);


            FolderId calendarFolder = new FolderId(WellKnownFolderName.Calendar, mailbox);


           // var result = service.FindAppointments(WellKnownFolderName.Calendar, calendarView);


            FindItemsResults<Item> response = service.FindItems(WellKnownFolderName.Calendar, calendarView);


            for (int i = 0; i < response.Items.Count; i++)
            {
                if (response.Items[i] is Appointment)
                {
                    Appointment appointment = (Appointment)response.Items[i];


                    RoomMeeting meeting = new RoomMeeting();
                    meeting.Duration = appointment.Duration;
                    meeting.Start = appointment.Start;
                    meeting.End = appointment.End;
                    meeting.Subject = appointment.Subject;
                    meeting.Owner = appointment.Organizer.Name;


                    meetings.Add(meeting);
                }
            }


            return meetings;
        }

The problem is that i only get the appointments made by user@mydomain.com and not all the appointments relative to myroom@domain.com.
How can i do that ?

Thanks for the help 


January 26th, 2013 11:28pm

Hi,

I am also facing same problem. Please help me how you resolve this.

Thanks in advance.

Thanks,

Suneel Kumar SVS.

Free Windows Admin Tool Kit Click here and download it now
April 5th, 2015 8:03am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics